<html>
<head>
<title>mod autolog</title>
<meta http-equiv="content-type" content="application/xhtml xml; charset=utf-8"/>
</head>
<body>
<?php
include'../header.php';
if(!file_exists('file')){
mkdir('file');}
echo '<font color="black">toot giúp bạn thêm chức năng autolog reload vào game,ứng dụng java online,lặp lại các thao tác,như auto. Sau khi mod xong ấn phím * để sử dụng<br></font>';
echo '<br>';
$text='code by khuonga2';
$submit=$_POST["submit"];
if(!$submit){echo'<form method="post" enctype="multipart/form-data"><font color="red">Tải lên file.zip .jar _jar:<br/><input type="file" name="file"><br/>hoặc import link file .zip .jar (không dùng link xtgem,wmp)</font><br><input type="text" name="link" value="http://">
<br><input type="submit" name="submit" value="xong!"></form><br>';}else{$file=$_FILES['file']['name'];
$link=$_POST['link'];
if($file){$type=$_FILES['file']['type'];
if(($type!="application/zip")&&($type!="application/x-java-archive")&&($type!="application/octet-stream")){echo'<font color="black"><b>định dạng tập tin không hợp lệ.Chỉ cho phép .zip .jar _jar !</b></font>';
exit("</body></html>");}
$file=str_replace(' ','_',$file);
$file=str_replace('.zip','.jar',$file);
$file=str_replace('_jar','.jar',$file);
$file=rand(100,900).'_'.$file;
move_uploaded_file($_FILES['file']['tmp_name'],"file/".$file);}
if(($link)&&($link!="http://")){$file=basename($link);
$ex=explode('.',$file);
if((end($ex)!='zip')&&(end($ex)!='jar')){echo'<font color="black"><b>link không hợp lệ.Chỉ cho phép .zip .jar!</b></font><br>';
exit("</body></html>");}else{
$file=str_replace('.zip','.jar',$file);
$file=rand(100,900).'_'.$file;
copy($link,"file/".$file);}}
if($file){$zip=new ZipArchive();
if($zip->open('file/'.$file)===TRUE){$zip1=zip_open('file/'.$file);
if($zip1){while($entry=zip_read($zip1)){$name=zip_entry_name($entry);
$size=zip_entry_filesize($entry);
$nd=zip_entry_read($entry,$size);
$nd=str_replace('javax/microedition/lcdui/Canvas','com/chen/javax/lcdui/log/KeyLog',$nd);
$nd=str_replace('javax/microedition/midlet/MIDlet','com/chen/javax/lcdui/log/MIDhack',$nd);
$nd=str_replace('Lcom/chen/javax/lcdui/log/MIDhack;)Ljavax/microedition/lcdui/Display','Ljavax/microedition/midlet/MIDlet;)Ljavax/microedition/lcdui/Display',$nd);
$nd=str_replace('paint','logPt',$nd);
$nd=str_replace('relogPt','repaint',$nd);
$nd=str_replace('RelogPt','Repaint',$nd);
$nd=str_replace('keyPressed','logKeyDown',$nd);
$nd=str_replace('keyReleased','keyLogKeyUp',$nd);
$nd=str_replace('com/chen/javax/lcdui/log/MIDhackStateChangeException','javax/microedition/midlet/MIDletStateChangeException',$nd);
$zip->addFromString($name,$nd);}}
zip_close($zip1);
$zip -> addFile('com/chen/javax/lcdui/log/MIDhack.class');
$zip -> addFile('com/chen/javax/lcdui/log/KeyLog.class');
$zip -> addFile('com/chen/javax/lcdui/log/a.class');
$zip -> addFile('com/chen/javax/lcdui/log/b.class');
$zip -> addFile('com/chen/javax/lcdui/log/c.class');
$zip->addFromString('khuongaa2.txt','mod autolog online by khuonga2');
$zip->close();
$zip2=new ZipArchive();
if($zip2->open('file/'.$file)===TRUE){
$kh=$zip2 -> getFromName('META-INF/MANIFEST.MF');
$wap='http://'.$_SERVER['HTTP_HOST'];
$kh1=str_replace('MIDlet-Delete-Confirm: ','MIDlet-Delete-Confirm: vào '.$wap.' để mod auto log online đơn giản nhất ////',$kh);
if(strlen($kh1)-strlen($kh)==0){
$mf="MIDlet-Delete-Confirm: vào $wap để mod auto log online đơn giản nhất\n$kh";
$zip2 -> addFromString('META-INF/MANIFEST.MF',$mf);}else{$zip2 -> addFromString('META-INF/MANIFEST.MF',$kh1);
}
$zip2 ->close();}
echo '<a href="file/'.$file.'"><font color="blue"><b>Tải xuống</b></font></a><br>Mod autolog thành công<br>';}else{echo'<br><br><font color="red">mod thất bại</font><br>';}}}
include'../footer.php';
?>
</body></html>